@charset "utf-8";
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-thumb{background:#666;border-radius:3px}

html, body {
    margin:0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-size: 15px;
}

body {
    overflow-y: scroll;
    overflow-x: auto;

    ul li {
        list-style:none;
    }

    &.single-file {
        div.file-catalog {
            overflow: hidden;

            .navigator.show {
                max-height: calc(100vh - 50px);
            }
        }

        .history-bar {
            //display:none;
        }
    }

    > .body {
        display: flex;
        align-items: center;
        margin: 0 auto;
        max-width: 1300px;
        //box-shadow: 0 0 12px grey;
        min-height: 100vh;

        /* 文件类目 */
        > .file-catalog {
            padding-left: 10000px;
            margin-left: -10000px;
            //background: #e7fcfc;
            background: rgb(247, 247, 247);
            width: 250px;
            overflow-x: hidden;
            overflow-y: auto;
            flex:0 auto;
            position: fixed;
            top:0;
            height: 100%;
            border-right: 1px rgb(236, 236, 236) solid;

            > ul {
                list-style: none;
                margin:0;
                margin-top:10px;
                margin-bottom:10px;
                padding: 0 10px;

                li {
                    &.file-catalog-item {
                        //height: 24px;
                        line-height: 24px;
                        margin: 8px 0;
                        width: 100%;
                        cursor: pointer;
                        padding: 0 10px;
                        display: block;
                        align-items: center;
                        box-sizing: border-box;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                        font-size: 15px;
                        border-left: 4px solid transparent;
                        font-weight: normal;

                        &:hover {
                            //background: #ececec;
                            color: gray;
                            //font-weight: bold;
                        }

                        &.active {
                            //border-left: solid 3px #29b295;
                            border-color: rgb(97, 218, 251);
                            font-weight: bold;
                            //background: #ececec;
                            //background: #f5d4c6;
                        }
                    }

                    &.dir {
                        color: black;
                        //font-weight: bold;
                        cursor: pointer;
                        padding-left:14px;
                        margin: 8px 0;
                        transition: margin .3s;

                        & > ul {
                            display: none;
                        }

                        &.open {
                            margin: 20px 0;

                            & > ul {
                                display: block;
                            }

                            & > div:after {
                                transform: rotate(135deg) translateY(3px);
                                left:10px;
                            }
                        }

                        & > div {
                            display: inline-block;
                            width: 100%;

                            &:after {
                                content: ' ';
                                width: 5px;
                                height: 5px;
                                border-top: solid 1px black;
                                border-right: solid 1px black;
                                transform: rotate(45deg);
                                display: inline-block;
                                transition: all .2s;
                                position: relative;
                                left: 5px;
                                top: -2px;
                            }
                        }
                    }

                    & > ul {
                        padding:0;
                    }
                }
            }
        }

        > .content-frame {
            flex: 1;
            width: calc(100% - 263px);
            height: 100%;
            margin-left: 252px;
            min-height: 100vh;
            //padding-right:15px;
            padding: 0 30px;

            > div.md-content {
                width:100%;
                height: 100%;
                display: flex;
                flex-direction: row;
                padding-bottom: 10px;

                > .content-catalog {
                    width: 0;
                    height: 100%;
                }

                > .content {
                    width: 100%;
                    height: 100%;
                    box-sizing: border-box;
                }
            }
        }

        /* 隐藏文件目录 */
        &.no-catalog {
            max-width: 1000px;

            .md-content {
                display: flex !important;
            }

            > div.file-catalog {
                display: none;
            }

            > div.content-frame {
                margin-left: 0;
                padding: 0 15px;
            }
        }
    } // > .body

    > .tip {
        position: fixed;
        bottom: -30px;
        padding: 5px 10px;
        max-width: 60vw;
        margin: 0 auto;
        background: rgba(0,0,0,0.5);
        color: #a9f7b3;
        font-size: 12px;
        border-radius: 10px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        word-break: break-all;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: bottom .3s;
        z-index:9999;

        &.show {
            bottom: 30px;
        }
    }

    //导航条
    .navigator  {
        //position: fixed;
        right: 0 ;
        top: 0 ;
        //background: #dbdada;
        background: #f1f1f1;
        //border:solid 1px #b6b6b6;
        border-radius: 5px;
        overflow: auto;
        opacity: 0.8;
        transition: all .5s;
        flex-direction: column;
        max-width: 0px;
        max-height: 0px;
        color: rgb(51,51,51);
        position:relative;


        &.show {
            max-width: 200px;
            max-height: 250px;

            .icon {
                text-align: right;
            }

        }

        .icon {
            padding: 3px;
            background: #acabab;
            color:black;
            font-weight: bold;
            text-align: right;
            flex:0 auto;
            cursor:default;
            text-align: center;
        }

        .wrap {
            flex:1;
            width:100%;
            height:100%;
            overflow: auto;
        }

        li {
            padding: 5px 8px;
            list-style: none;
            cursor:pointer;
            white-space: nowrap;
            width: 100%;
            text-overflow: ellipsis;
            box-sizing: border-box;
            overflow: hidden;
            //transition: max-height .3s, max-width .3s;
            transition: all .3s;
            font-weight: normal;

            &.active {
                background: #a7cc6a  !important;
            }

            &:hover {
                background: #cccccc;
            }

            $lvPadding: 10;

            &.hl-2 {
                padding-left: #{$lvPadding*1}px;
            }
            &.hl-3 {
                padding-left: #{$lvPadding*2}px;
            }
            &.hl-4 {
                padding-left: #{$lvPadding*3}px;
            }
            &.hl-5 {
                padding-left: #{$lvPadding*4}px;
            }
            &.hl-6 {
                padding-left: #{$lvPadding*5}px;
            }
        }
    }

    #navigatorContent {
        padding:0;
        margin:0;

        li {
            padding: 5px 8px;
            list-style: none;
            cursor:pointer;
            white-space: nowrap;
            width: 100%;
            text-overflow: ellipsis;
            box-sizing: border-box;
            overflow: hidden;
            transition: all .3s;

            &.active {
                background: #e1f5c0 !important;
            }

            &:hover {
                background: #cccccc;
            }

            $lvPadding: 10;

            &.hl-2 {
                padding-left: #{$lvPadding*1}px;
            }
            &.hl-3 {
                padding-left: #{$lvPadding*2}px;
            }
            &.hl-4 {
                padding-left: #{$lvPadding*3}px;
            }
            &.hl-5 {
                padding-left: #{$lvPadding*4}px;
            }
            &.hl-6 {
                padding-left: #{$lvPadding*5}px;
            }
        }
    }

    .build-version {
        position: fixed;
        opacity: 0.5;
        font-size: 12px;
        color: gray;
        left:0;
        bottom:0;
    }
}

.mermaid text.error-text {
    font-size: 70px;
    color:red;
}


.history-bar {
    position: fixed;
    top:3px;
    right:3px;
    display: flex;
    opacity:0.7;
    justify-items: center;

    .left-btn,.right-button {

    }

    .counter {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 3px;
        font-size: 12px;
        color: #393939;
    }
}
